package com.campus.service;

import com.campus.pojo.Pager;
import com.campus.pojo.SysModule;
import com.campus.pojo.SysUser;

import java.util.List;
import java.util.Map;

public interface UserService {
    SysUser login(String name, String psw);//根据登录名和密码，查找用户
    List<SysModule> selectModuleById(String userId);//根据用户code 查找功能模块

    int count(Map<String, Object> params);

    List<SysUser> selectAreaUserByPage(SysUser user, Pager pager);

    String isExist(SysUser user);//检验用户是否存在

    int upAreaAdmin(SysUser user);//更新用户

    int addAreaAdmin(SysUser user);//新增

    int deleteAreaUser(SysUser user);//删除

    int resetPassword(SysUser user);//重置密码

    SysUser selectByUserCode(String code);//根据主键查询用户

    Integer count1(Map<String, Object> params);

    List<SysUser> selectByPage1(SysUser user, Pager pager);

    String isExistName(String name, String userCode, String areaId);

    String isExistUnit(String unitId, String userCode, String areaId);

    int upUser(SysUser user);

    List<String> getCheckedRole(String userCode);

    int bindRole(String userCode, String roleCodes, String areaId);
}
